home *** CD-ROM | disk | FTP | other *** search
- /*
- AETracker.h
- C Interfaces to AETracker
- Created Friday, July 31, 1992 10:41:40 PM
-
-
- Programmatic control of the AETracker INIT
- Copyright 1992, C.K. Haun, All rights reserved
- */
-
- /* AETracker gestalt selector constant */
- #ifndef __AETRACKER__
-
- #define __AETRACKER__
-
- #ifndef __TYPES__
-
- #include <Types.h>
-
- #endif
-
- #ifndef __FILES__
-
- #include <Files.h>
-
- #endif
-
- #define kAETrackerGestalt 'CKI3'
- /* control selectors */
- enum {
- kAETToggle = 0, /* turn AETracker on and off */
- kAETStatus, /* get AETracker status */
- kAETInterceptOutput, /* intercept AETracker text output */
- kAETReconnectOutput, /* reconnect output */
- kAETInterceptParse, /* intercept AETracker AppleEvent routine parsing */
- kAETReconnectParse, /* reconnect parsing */
- kAETSetPrefs, /* temporarily modify AETracker settings */
- kAETEmergencyReset /* undo any external changes to AETracker */
- };
-
- /* This is the preferences structure that AETracker uses. */
- /* Can be modified and passed to kAETSetPrefs */
- struct PrefsStruct {
- long keyMask1;
- long keyMask2;
- short collectFrom;
- short collectLevel;
- short modKeys[4];
- long actionKey;
- short infoLevel;
- short disabled;
- short findMBug;
- };
-
-
- /* Flag values for controlling AETracker */
- enum {
- kAETDisconnectRegularOutput = 0x1, kAETNoFileOutput = 0x2, kAETDisconnectRegularParse = 0x4, kAETUsePassedFileFSSpec = 0x8
- };
-
- /* error codes */
- enum {
- kAETBadSelectorErr = 8080, /* returned by AEtracker */
- kAETBadParamBlockErr, /* something weird in the PB you passed (missing or incomplete) */
- kAETAlreadyInterceptedErr /* someone has already intercepted AETracker. */
- };
- /* Definitions for routines you pass to AETracker */
- /* routine to intercept text output */
- typedef pascal OSErr(*externOutputProcPtr)(ParmBlkPtr paramBlock, long refCon);
- /* routine to intercept AppleEvent calls */
- typedef pascal OSErr(*externParseOutputProcPtr)(Ptr AEParmPtr, long AESelector, long refCon);
-
- typedef struct AETrackerStatusBlock {
- short AETActive;
- short fileInterceptActive;
- short fileExclusiveIntercept;
- externOutputProcPtr fileInterceptRoutine;
- long fileRefCon;
- short parseInterceptActive;
- short parseExclusiveIntercept;
- externParseOutputProcPtr parseInterceptRoutine;
- long parseRefCon;
- } AETrackerStatusBlock;
- typedef AETrackerStatusBlock *AETrackerStatusBlockPtr, **AETrackerStatusBlockHdl;
- /* Param block for calls to AETracker */
-
- typedef struct AETrackExtParam {
- short fileRefNum;
- FSSpec outFile;
- union {
- externOutputProcPtr outputPtr;
- externParseOutputProcPtr outputParsePtr;
- } procs;
- union {
- AETrackerStatusBlockPtr statusData;
- Ptr externDataPtr;
- } dataPtrs;
- long refCon;
- unsigned short flags;
- } AETrackExtParam;
- typedef AETrackExtParam *AETrackExtParamPtr, **AETrackExtParamHdl;
-
- /* Definition of interface to AETracker through Gestalt returned pointer */
- typedef pascal OSErr(*AETrackExternProcPtr)(AETrackExtParamPtr theParm, short selector);
-
-
- #endif /* included... */
-